package site.assad.basicQuartzTest;

import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.Date;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2018/1/19 16:59
 * Description:
 */
public class HelloJob implements Job{
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        JobDetail jobDetail = context.getJobDetail();
        System.out.println("["+jobDetail.getKey().getName() + ","
                +jobDetail.getKey().getGroup() +"] "
                +"Hello world! "
                + new Date());
    }
}
